package 设计模式.decorator;

public class CoffeeBar {
    public static void main(String[] args) {
        Drink longBlack = new LongBlack();
        System.out.println("费用="+longBlack.cost());
        System.out.println("描述="+longBlack.getDes());

        Drink longBlack2 = new Milk(longBlack);//改为调用其他方法
        System.out.println("加牛奶="+longBlack2.cost());
        System.out.println("描述="+longBlack2.getDes());

        longBlack2=new Chocolate(longBlack2);
        System.out.println("再加巧克力="+longBlack2.cost());
        System.out.println("描述="+longBlack2.getDes());
    }
}
